import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/login'
        },
        {
            path: '/login',
            component: () => import(/* webpackChunkName: "login" */ '../components/Login.vue'),
            meta: { title: '登录' }
        },
         {
             path: '/',
             component: () => import(/* webpackChunkName: "home" */ '../components/common/Home.vue'),
             meta: {title: '自述文件'},
             children: [
                 {
                     path: '/manage',
                     component: () => import(/* webpackChunkName: "manage" */ '../components/ManageMain.vue'),
                     meta: { title: '主页' }
                 },
                 {
                     path: '/user',
                     component: () => import(/* webpackChunkName: "patient" */ '../components/User.vue'),
                     meta: { title: '用户管理' }
                 },
                 {
                     path: '/role',
                     component: () => import(/* webpackChunkName: "patient" */ '../components/Role.vue'),
                     meta: { title: '角色管理' }
                 },
                 {
                     path: '/menus',
                     component: () => import(/* webpackChunkName: "patient" */ '../components/Menu.vue'),
                     meta: { title: '菜单管理' }
                 },
                {
                    path: '/techType',
                    component: () => import(/* webpackChunkName: "login" */ '../components/TechType.vue'),
                    meta: { title: '技术分类字典' }
                },
                 {
                     path: '/deptment',
                     component: () => import(/* webpackChunkName: "login" */ '../components/Department.vue'),
                     meta: { title: '应用科室字典' }
                 },
                 {
                     path: '/para',
                     component: () => import(/* webpackChunkName: "login" */ '../components/Para.vue'),
                     meta: { title: '产品参数字典' }
                 },
                 {
                     path: '/mustPicture',
                     component: () => import(/* webpackChunkName: "login" */ '../components/MustPic.vue'),
                     meta: { title: '产品必传附件字典' }
                 },
                {
                    path: '/factory',
                    component: () => import(/* webpackChunkName: "login" */ '../components/Factory.vue'),
                    meta: { title: '厂家档案管理' }
                },
                 {
                     path: '/supplier',
                     component: () => import(/* webpackChunkName: "login" */ '../components/Supplier.vue'),
                     meta: { title: '供应商管理' }
                 },
                 {
                     path: '/picture',
                     component: () => import(/* webpackChunkName: "login" */ '../components/Picture.vue'),
                     meta: { title: '资质管理' }
                 },
                 {
                     path: '/product',
                     component: () => import(/* webpackChunkName: "login" */ '../components/Product.vue'),
                     meta: { title: '产品管理' }
                 },
        //         {
        //             path: '/train',
        //             component: () => import(/* webpackChunkName: "login" */ '../components/page/hospital/TrainGj.vue'),
        //             meta: { title: '康复处方1' }
        //         },
        //         // {
        //         //     path: '/traingj',
        //         //     component: () => import(/* webpackChunkName: "login" */ '../components/page/hospital/TrainGj.vue'),
        //         //     meta: { title: '康复处方' }
        //         // },
        //         {
        //             path: '/cf',
        //             component: () => import(/* webpackChunkName: "login" */ '../components/page/hospital/Cf.vue'),
        //             meta: { title: '康复训练' }
        //         },
        //         {
        //             path: '/trainRecord',
        //             component: () => import(/* webpackChunkName: "train" */ '../components/page/hospital/TrainRecord'),
        //             meta: { title: '康复记录' }
        //         },
        //         {
        //             path: '/menu',
        //             component: () => import(/* webpackChunkName: "train" */ '../components/page/hospital/Menu'),
        //             meta: { title: '康复训练菜单配置' }
        //         },
        //         {
        //             path: '/user',
        //             component: () => import(/* webpackChunkName: "patient" */ '../components/page/hospital/system/User.vue'),
        //             meta: { title: '用户管理' }
        //         },
        //         {
        //             path: '/role',
        //             component: () => import(/* webpackChunkName: "patient" */ '../components/page/hospital/system/Role.vue'),
        //             meta: { title: '角色管理' }
        //         },
        //         {
        //             path: '/menus',
        //             component: () => import(/* webpackChunkName: "patient" */ '../components/page/hospital/system/Menu.vue'),
        //             meta: { title: '菜单管理' }
        //         },
             ]
         },
        // {
        //     path: '/isExistUser',
        //     component: () => import(/* webpackChunkName: "isexist" */ '../components/page/hospital/addUser.vue'),
        //     meta: { title: '注册用户' }
        // },
        {
            path: '*',
            redirect: '/404'
        }
    ],
});
